<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        {{msg}}
    </div>
    <script type="text/javascript" src="js/vue.js"></script>
    <script type="text/javascript" src="js/axios.js"></script>
    <script>
        const url =
            "https://www.baidu.com/home/other/data/weatherInfo?city=%E6%B7%B1%E5%9C%B3&indextype=manht&_req_seqid=0xef09a5ce0006f24d&asyn=1&t=1590655348911&sid=31725_1421_31670_21122_31594_31606_31270_31464_30823_26350"
        async function query() {
            let res = await axios.get(url); //await 后面跟Promise对象，可以得到异步结果
            let res = await axios.get(url); // 多个await可以自动保持顺序
            return res; // async函数的返回值是Promise对象
        }
        query().then((res) => {
            console.log(res.data);
        });
        var vm = new Vue({
            el: '#app',
            data: {
                msg: "hello vue"
            },
        })
    </script>
</body>

</html>